import request from '@/utils/request';

/**
 * 查询登录日志
 * @param name 参数
 * @returns {Promise<AxiosResponse<T>>}
 */
const baseModule = '/logininfor';

export const getListPage = (params) => {
  return request({
    url: `${baseModule}/list`,
    method: 'post',
    // headers:{
    //     hasRepeatSubmit:false
    // },
    data: params,
  });
};

/**
 * 根据id查询登录详情
 * @param id 登录详情id
 * @return  {Promise<AxiosResponse<T>>}
 * @author: Herther
 * @since 1.0.0
 * @date: 2022/9/12 15:34
 */
export const getLogininfor = (id) => {
  return request({
    url: `${baseModule}/get/${id}`,
    method: 'get',
  });
};

/**
 * 批量删除与单条删除
 * @param ids 删除的ids
 * @auther: Herther
 * @return  {Promise<AxiosResponse<T>>}
 * @since 1.0.0
 * @date: 2022/9/12 20:29
 */
export const removeByIds = (ids) => {
  return request({
    url: `${baseModule}/remove/${ids}`,
    method: 'delete',
  });
};
